package org.urey.fmp.commom.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.urey.fmp.commom.annotation.CustomRequestBody;
import org.urey.fmp.commom.entity.EnumType;
import org.urey.fmp.commom.entity.User;

public interface TestService {

	@PostMapping("/findOne")
	public User findOne(@RequestParam Long id);
	
	@PostMapping("/findList")
	public List<User> findList(@CustomRequestBody List<Long> ids);

	@PostMapping("/update1")
	public void update(@CustomRequestBody User user1,@CustomRequestBody User user2);
	
	@PostMapping("/update2")
	public void update(@CustomRequestBody User user,@CustomRequestBody Date date);

	@PostMapping("/update3")
	public void update(@CustomRequestBody List<User> users,@CustomRequestBody Date date,@RequestParam String name);
	
	@PostMapping("/update4/{id}")
	public void update(@CustomRequestBody List<User> users,@CustomRequestBody List<EnumType> enums,@RequestParam String name,@PathVariable Long id);
	
	@PostMapping("/findMap")
	public Map<Long, User> findMap(@CustomRequestBody List<Long> ids);
	
}
